---
id: configuration-input
title: Input
---

## target

Type: `String`.

Valid values: path or link to the specification.

```js
import { defineConfig } from 'orval';

export default defineConfig({
  petstore: {
    input: {
      target: './petstore.yaml',
    },
  },
});
```

## override

Type: `Object`.

Allows overriding the specification

### transformer

Type: `String | Function`.

Valid values: path or implementation of a transformer function.

This function is executed when Orval generates clients. The function should accept an argument of the type <a href="https://github.com/metadevpro/openapi3-ts/blob/master/src/model/openapi30.ts#L12" target="_blank">OpenAPIObject</a>, and should return a transformed <a href="https://github.com/metadevpro/openapi3-ts/blob/master/src/model/openapi30.ts#L12" target="_blank">OpenAPIObject</a>.

```js
import { defineConfig } from 'orval';

export default defineConfig({
  input: {
    override: {
      transformer: 'src/api/transformer/add-version.js',
    },
  },
});
```

An example of a transformer function can be found <a href="https://github.com/orval-labs/orval/blob/master/samples/basic/api/transformer/add-version.js" target="_blank">here</a>

## filters

Type: `Object`.

Default value: `{}`.

If specified, Orval only generates the endpoints after applying the filter.

### mode

Type: `String`.

Valid values: `include`, `exclude`.

Default value: `include`.

This settings determines whether the provided `tags` or `schemas` are excluded or included from the specification.
For instance, the example below generates endpoints that do not contain the tag `pets`.

```js
import { defineConfig } from 'orval';

export default defineConfig({
  petstore: {
    input: {
      filters: {
        mode: 'exclude',
        tags: ['pets'],
      },
    },
  },
});
```

### tags

Type: `(String | RegExp)[]`.

Default Value: `[]`.

This option allows filtering on `tags`. For instance ,the example below only generates the endpoints that contain the tag `pets` or matches the regular expression `/health/`.

```js
import { defineConfig } from 'orval';

export default defineConfig({
  petstore: {
    input: {
      filters: {
        tags: ['pets', /health/],
      },
    },
  },
});
```

### schemas

Type: `(String | RegExp)[]`.

Only schema names that match the specified `String` or `RegExp` will be automatically generated.
For instance, the example below only generates the schema object that matches string `Error` or regular expression `/Cat/`.

```js
import { defineConfig } from 'orval';

export default defineConfig({
  petstore: {
    input: {
      filters: {
        schemas: ['Error', /Cat/],
      },
    },
  },
});
```
